package com.monitor.service;

import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.service.IService;
import com.monitor.entity.ErpMateriel;
import com.monitor.entity.ErpSpecifications;
import com.monitor.entity.MaterIelName;
import com.monitor.util.Result;

/**
 * <p>
 * 物料表 服务类
 * </p>
 *
 * @author LX
 * @since 2018-09-08
 */
public interface ErpMaterielService extends IService<ErpMateriel> {

	public Result<List<MaterIelName>> yiHuangShi();
	//获得一晃式第一层接口
	public Result<List<ErpSpecifications>> selectTop();
	
	//获得一晃式品牌规格接口
	public Result<List<Map<String, Object>>> selectTwo(String pid);
	
	//获得一晃式品牌型号接口
	public Result<List<Map<String, Object>>> selectThree(String pid);
	
	//获得一晃式系统参数接口 69 51 27
	public Result<List<String>> selectSytem(int shu);
	
	//根据车辆id查询物料信息列表
	public Result<List<ErpMateriel>> selectByCarId(int carId);
	
	
	/**
	 *	 查询物料库存信息
	 * @param warehouseIds  仓库id数组 全部仓库的话传所有仓库的id
	 * @param startTime
	 * @param endTime
	 * @param name  物料名称
	 * @return
	 */
	public Result<List<String[]>> selectByBranch(List<Integer> warehouseIds,String startTime,String endTime,String name);
	
	public Result<Map<String, Object>> findByLibraryName(int WareId,List<Integer> warehouseIds,String startTime,String endTime);
	
	/**
	 * 带预警值的仓库信息查询
	 * @param warehouseIds
	 * @param startTime
	 * @param endTime
	 * @return
	 */
	public Result<List<String[]>> selectByBranchWarn(Integer warehouseIds,String startTime,String endTime);
	
	public Result<Integer> shezhiWarn(int materielId,int custId,int wareId,int materielWarnAmount);
	
	//物料库存查看明细
	public Result<List<Map<String, Object>>> selectDateils(String warehouseIds,int wareId,String startTime,String endTime);
}
